package fr.ensisa.sunspot.event;

import fr.ensisa.sunspot.enums.UINT;
import fr.ensisa.sunspot.enums.bVk;

public class MessageEvent extends AbstractEvent {
	
	private String window;
	private UINT uint;
	private bVk bvk;
	private int i;

	public MessageEvent(int major, int minor) {
		super(major, minor);
	}

	public String getWindow() {
		return window;
	}

	public void setWindow(String window) {
		this.window = window;
	}

	public UINT getUint() {
		return uint;
	}

	public void setUint(UINT uint) {
		this.uint = uint;
	}

	public bVk getBvk() {
		return bvk;
	}

	public void setBvk(bVk bvk) {
		this.bvk = bvk;
	}

	public int getI() {
		return i;
	}

	public void setI(int i) {
		this.i = i;
	}
	

	public String toString () {
        StringBuffer tmp = new StringBuffer ();
        tmp.append (super.toString());
        tmp.append(" ");
        tmp.append(window);
        tmp.append(" ");
        tmp.append(uint.value());
        tmp.append(" ");
        tmp.append(bvk.value());
        tmp.append(" ");
        tmp.append(i);
        return tmp.toString();
    }

    public IEvent clone() {
        MessageEvent copy = new MessageEvent (getMajor(), getMinor());
        copy.setState(getState());
        copy.setTimeStamp(getTimeStamp());
        copy.setWindow(getWindow());
        copy.setUint(getUint());
        copy.setBvk(getBvk());
        copy.setI(getI());
        return copy;
    }	
	
	

}
